package org.dbi.logger;
/**
 * The only difference to the standard StreamHandler is 
 * that a MAXLEVEL can be defined (which then is not published)
 * 
 * @author Kai Goergen
 */

import java.io.PrintStream;
import java.util.logging.Formatter;
import java.util.logging.LogRecord;
import java.util.logging.StreamHandler;

public class MaxlevelStreamHandler extends StreamHandler {

    /**
     * Flush wordt gebruikt om er voor te zorgen dat het bericht meteen verschijnt.
     */
    @Override
    public synchronized void publish(LogRecord record) {
            super.publish(record);
            super.flush();
    }

    public MaxlevelStreamHandler(PrintStream out, Formatter formatter) {
        super(out, formatter);
    }

    public MaxlevelStreamHandler() {
        super();
    }
}